<template>
  <div class="bg">
    <img class="bg-0" src="~img/common/bg-0.png" />
    <img class="bg-1" src="~img/common/bg-1.png" />
    <img class="bg-2" src="~img/common/bg-2.png" />
    <img class="bg-3" src="~img/common/bg-3.png" />
    <!-- 手绘水波特效 -->
    <div class="wave"></div>
    <div class="wave"></div>
    <div class="wave"></div>
    <div class="wave"></div>
    <div class="wave"></div>
    <div class="wave"></div>
    <div class="wave"></div>
    <div class="wave"></div>
    <div class="wave"></div>
  </div>
</template>

<script>
export default {
  name: "BackgorundPhoto"
};
</script>

<style scoped>
.bg {
  min-width: 1024px;
  min-height: 500px;
  width: 100%;
  height: 100vh;
  background: url("~img/common/bg.png") no-repeat center/cover;

  position: fixed;
  top: 0;
  z-index: -3;
  overflow: hidden;
}


.bg .bg-0 {
  width: 120%;
  height: 120%;
  position: absolute;
  right: -5%;
  top: -15%;
  animation: wave-0 infinite 5s linear alternate;
  z-index: -5;
}
.bg .bg-1 {
  width: 200%;
  height: 200%;
  position: absolute;
  right: -15%;
  top: -40%;
  transform: rotateX(180deg) rotate(65deg);
  animation: wave-1 infinite 5s linear alternate;
  z-index: -3;
}
.bg .bg-2 {
  position: absolute;
  top: -45%;
  left: 2%;

  animation: wave-2 infinite 5s linear alternate;
  z-index: -2;
}
.bg .bg-3 {
  position: absolute;
  top: -35%;
  right: -22%;

  animation: wave-3 infinite 20s linear alternate;
  z-index: -2;
}
/* 水波特效 */
.bg .wave {
  z-index: -4;
  width: 0px;
  height: 0px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: wave infinite 15s ;
}
.bg .wave:nth-of-type(1){animation-delay:1s }
.bg .wave:nth-of-type(2){animation-delay:2s }
.bg .wave:nth-of-type(3){animation-delay:3s }
.bg .wave:nth-of-type(4){animation-delay:4s }
.bg .wave:nth-of-type(5){animation-delay:5s }
.bg .wave:nth-of-type(6){animation-delay:6s }
.bg .wave:nth-of-type(7){animation-delay:7s }
.bg .wave:nth-of-type(8){animation-delay:8s }
.bg .wave:nth-of-type(9){animation-delay:9s }
/* 动画 */

@keyframes wave-0 {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(3deg);
  }
}

@keyframes wave-1 {
  0% {
    transform: rotateX(180deg) rotate(65deg);
  }
  100% {
    transform: rotateX(180deg) rotate(60deg);
  }
}
@keyframes wave-2 {
  100% {
    transform: translate(5%, -5%);
  }
}
@keyframes wave-3 {
  100% {
    transform: rotate(120deg);
  }
}
/* 水波 */
@keyframes wave {
  0% {
    
  }
  100% {
    padding: 35%;
    opacity: 0;
  }
}
</style>